<?php

declare(strict_types=1);

namespace App\Model\Orders;

use App\Model\Model;
use App\Traits\Model\Orders\OrderAction as OrderActionTraits;

/**
 * @property int $id 
 * @property int $order_id 订单ID
 * @property int $user_id 操作用户ID,0为系统自动操作
 * @property string $user_type 用户类型
 * @property int $shop_id 店铺ID
 * @property int $status 订单状态
 * @property int $pay_status 付款状态
 * @property int $is_shipping 是否发货|["否","是"]
 * @property string $remark 操作备注
 * @property string $desc 操作描述
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 */
class OrderAction extends Model
{
    use OrderActionTraits;

    /**
     * The table associated with the model.
     */
    protected ?string $table = 'order_action';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'order_id', 'user_id', 'user_type', 'shop_id', 'status', 'pay_status', 'is_shipping', 'remark', 'desc', 'created_at', 'updated_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'order_id' => 'integer', 'user_id' => 'integer', 'shop_id' => 'integer', 'status' => 'integer', 'pay_status' => 'integer', 'is_shipping' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];

    /**
     * 自动新增
     * @var array|string[]
     */
    public array $insert = [
        'shop_id'
    ];
}
